Object* f(const Object& co)
{
OrderedCltn c;
c.add(co);
return c.remove(co);
}
C++ R2.0 now issues error or warning messages when a const pointer is converted into a non-const pointer. To eliminate these problems, the const arguments to some functions such as add() have been changed to non-const arguments. These changes affect classes Assoc, LinkOb, and the collection classes.
If you need to add a const object to a collection class, you must use an explicit cast:
c.add((Object&)co);